package com.tdam2011.grupo05.database.manager;

import java.util.LinkedList;
import java.util.List;

import android.database.Cursor;

import com.tdam2011.grupo05.entities.account.Account;
import com.tdam2011.grupo05.entities.contact.ContactWeb;
import com.tdam2011.grupo05.entities.logs.LogImp;
import com.tdam2011.grupo05.entities.message.MessageWeb;
import com.tdam2011.grupo05.entities.thread.ThreadWeb;

public interface Manager {

	MessageWeb getMessage(long messageId);

	long saveMessage(MessageWeb m);

	List<MessageWeb> getAllMessages();

	void deleteMessage(MessageWeb m);

	void updateMessage(MessageWeb m);

	MessageWeb getMessageFromCursor(Cursor c);

	LinkedList<MessageWeb> getUnsendedMessage();

	Cursor getMessageCursor();

	ThreadWeb getThread(long threadId);

	long saveThread(ThreadWeb t);

	List<ThreadWeb> getAllThread();

	void deleteThread(ThreadWeb t);

	void updateThread(ThreadWeb t);

	ThreadWeb getThreadByContact(long idContact);

	ThreadWeb getThreadByContactName(String name);

	ThreadWeb getThreadByCursor(Cursor c);

	Cursor getThreadCursor();

	ContactWeb getContactWeb(long contactId);

	long saveContactWeb(ContactWeb c);

	List<ContactWeb> getAllContact();

	void deleteContactWeb(ContactWeb c);

	void updateContactWeb(ContactWeb c);

	ContactWeb getContactWebByName(String contactName);

	Cursor getContactWebCursor();

	long saveAccount(Account a);

	void deleteAccount(Account a);

	void updateAccount(Account a);

	Account getAccount(long idAccount);

	Account get(String user, String pass);

	Account get(String user);

	Cursor getAccountCursor(String selection, String[] selectionArgs,
			String sortOrder);

	List<Account> getAllAccount();

	long saveLog(LogImp l);

	void deleteLog(LogImp l);

	void updateLog(LogImp l);

	LogImp getLog(long idLog);

	List<LogImp> getAllLog();

	Cursor getLogCursor(String selection, String[] selectionArgs,
			String sortOrder);
}
